home *** CD-ROM | disk | FTP | other *** search
/ Video Commodore 64 #2 / Video_Commodore_64_2_19xx_GEASA.d64 / par gana (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  4KB  |  124 lines

  1. 5 rem par gana  ------- vc64-02
  2. 10 gosub3000
  3. 100 gosub1000
  4. 410 end
  5. 1000 dim r(1,5)
  6. 1020 print"[147]"
  7. 1025 l=0: b=0
  8. 1030 for i=0 to 5
  9. 1040 r(1,i)=4
  10. 1050 r(0,i)=4
  11. 1060 next i
  12. 1070 a=0: b=0
  13. 1090 p=int((13*rnd(1)+9)/2)*2+1
  14. 1100 if p=1 then1530
  15. 1110 print "hay";p;"chips en la placa"
  16. 1120 e1=e
  17. 1130 l1=l
  18. 1140 e=(a/2-int(a/2))*2
  19. 1150 l=int((p/6-int(p/6))*6+.5)
  20. 1160 if r(e,l)>=p then1320
  21. 1170 m=r(e,l)
  22. 1180 if m<=0 then1370
  23. 1190 p=p-m
  24. 1200 if m=1 then1510
  25. 1210 print "cojo";m;"chips y dejo";p;"...":print
  26. 1215 print"cuantos mueves tu:";
  27. 1220 b=b+m
  28. 1230 input m
  29. 1240 m=int(m)
  30. 1250 if m<1 then1450
  31. 1260 if m>4 then1460
  32. 1270 if m>p then1460
  33. 1280 if m=p then1360
  34. 1290 p=p-m
  35. 1300 a=a+m
  36. 1310 goto1100
  37. 1320 if p=1 then1550
  38. 1330 print "cojo";p;"chips"
  39. 1340 r(e,l)=p
  40. 1350 b=b+p
  41. 1360 if b/2=int(b/2) then1420
  42. 1370 print"final del juego...":print
  43. 1380 print"tu ganas !!!":print
  44. 1390 if r(e,l)=1 then1480
  45. 1400 r(e,l)=r(e,l)-1
  46. 1410 goto1570
  47. 1420 print"final del juego...":print
  48. 1425 print"tu pierdes !!!":print
  49. 1430 goto1570
  50. 1450 if m=0 then1570
  51. 1460 print"por favor..."
  52. 1462 printm;"no es una respuesta correcta."
  53. 1465 print:print"solo admito valores entre 1 y 4":print:print"repite tu movimiento:";
  54. 1470 goto1230
  55. 1480 if r(e1,l1)=1 then1070
  56. 1490 r(e1,l1)=r(e1,l1)-1
  57. 1500 goto1070
  58. 1510 print "cojo un chip y dejo";p:print:print"cual es tu movimiento:";
  59. 1520 goto1220
  60. 1530 print "queda un chip en la placa"
  61. 1540 goto1120
  62. 1550 print "cojo un chip"
  63. 1560 goto1340
  64. 1570 print:print:print"quieres jugar otra partida?:":print:print
  65. 1580 geta$:ifa$=""then1580
  66. 1590 ifa$="s"then1020
  67. 1600 ifa$="n"then1999
  68. 1610 goto1580
  69. 1999 return
  70. 3000 poke53281,14:poke53280,15:print"[147]";
  71. 3010 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  72. 3020 print"[180]                par  gana             [170]";
  73. 3030 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  74. 3040 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  75. 3050 print"[180]       una version de un juego cla-   [170]";
  76. 3060 print"[180]    sico. seguro que en alguna oca-   [170]";
  77. 3070 print"[180]    sion lo has jugado, con ceril-    [170]";
  78. 3080 print"[180]    las, por ejemplo.                 [170]";
  79. 3090 print"[180]       ahora puedes hacerlo con tu    [170]";
  80. 3100 print"[180]    commodore y competir con el.      [170]";
  81. 3110 print"[180]                                      [170]";
  82. 3120 print"[180]        al comienzo del juego, un     [170]";
  83. 3130 print"[180]    numero impar de objetos es si-    [170]";
  84. 3140 print"[180]    tuado en una fila.                [170]";
  85. 3150 print"[180]        en cada turno, y sin poder    [170]";
  86. 3160 print"[180]    saltarse ninguno, tanto tu co-    [170]";
  87. 3170 print"[180]    mo tu c-64 debeis retirar de      [170]";
  88. 3180 print"[180]    la fila entre 1 y 4 objetos.      [170]";
  89. 3190 print"[180]        el juego termina cuando se    [170]";
  90. 3200 print"[180]    retira el ultimo objeto y gana    [170]";
  91. 3210 print"[180]                                      [170]";
  92. 3220 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  93. 3230 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  94. 3240 print"[180]      pulsa 'space' para continuar    [170]";
  95. 3250 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  96. 3255 geta$:ifa$<>" "then3255
  97. 3260 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  98. 3270 print"[180]                 par  gana            [170]";
  99. 3280 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  100. 3290 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  101. 3300 print"[180]    quien haya retirado un numero     [170]";
  102. 3310 print"[180]    par de objetos.                   [170]";
  103. 3320 print"[180]                                      [170]";
  104. 3330 print"[180]        parece facil...pero cuida-    [170]";
  105. 3340 print"[180]    do !!! utilizando tecnicas de     [170]";
  106. 3350 print"[180]    inteligencia artificial, tu       [170]";
  107. 3360 print"[180]    commodore-64 aprende a jugar      [170]";
  108. 3370 print"[180]    al mismo tiempo que compite       [170]";
  109. 3380 print"[180]    contigo.                          [170]";
  110. 3390 print"[180]                                      [170]";
  111. 3400 print"[180]        un ultimo detalle: cuando     [170]";
  112. 3410 print"[180]    quieras finalizar el juego,       [170]";
  113. 3420 print"[180]    simplemente responde '0' en tu    [170]";
  114. 3430 print"[180]    turno de movimiento.              [170]";
  115. 3440 print"[180]                                      [170]";
  116. 3450 print"[180]              *********               [170]";
  117. 3460 print"[180]                                      [170]";
  118. 3470 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  119. 3480 print"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]";
  120. 3490 print"[180]      pulsa 'space' para continuar    [170]";
  121. 3500 print"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]";
  122. 3950 geta$:ifa$<>" "then3950
  123. 3999 return
  124.